<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>背景</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            display: flex;
            place-content: center;
        }

        .box {
            width: 800px;
            height: 900px;
            border: solid;
            border: 10px dashed black;
            /* 虚线框 */
            padding: 10px;
            background: pink url(./1.jpg) no-repeat;
            background-origin: content-box;
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>